<?php

namespace Proj\ResmanBundle\Form;

use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolverInterface;

class TaskType extends AbstractType
{
    public function buildForm(FormBuilderInterface $builder, array $options)
    {
        $builder
            ->add('description', 'textarea', array('label' => 'Descriere'))
            ->add('startDate', 'date', array('label' => 'Data inceperii'))
            ->add('endDate', 'date', array('label' => 'Data finalizarii'))
        ;
    }

    public function setDefaultOptions(OptionsResolverInterface $resolver)
    {
        $resolver->setDefaults(array(
            'data_class' => 'Proj\ResManBundle\Entity\Task'
        ));
    }

    public function getName()
    {
        return 'proj_resmanbundle_tasktype';
    }
}